Ensuring the integrity of digital data is a key concern in system development. As such, various error detection and error correction mechanisms have been developed. For instance, a simple error detection technique involves the use of checksums. A checksum includes one or more bits added to a data word, whose value is the modular sum of all the bits in that word. When the word is read from memory, error detection circuitry can verify that the data value is consistent with the checksum, and if an error is detected, can take appropriate action. For example, the system can stop using the corrupted memory word, stop using the entire memory page, record the error in a log file, or reset all or part of the system.
More advanced techniques permit not only detection, but also correction, of data errors. For instance, multiple checksums can be applied to overlapping regions of the data word. With this technique, a single bit data error will tend to result in two incorrect checksums, allowing identification of the corrupted bit. Moreover, one incorrect checksum can be interpreted as an error in the checksum itself, and not in any of the memory data bits.
Another common error correction technique involves the use of a Hamming code. This technique relies upon encoding data words in such a way that consecutive values will differ from each other by more than one bit. Thus, if one bit is corrupted, it can be identified by finding the closest valid data word encoding. This approach, like the multiple checksum technique, can detect multiple bit errors, but often cannot correct them. For instance, Hamming codes are typically configured to correct single bit errors and detect double bit errors.
As such error detecting and error correcting circuitry is incorporated into memory controllers and similar devices, it is of ten desirable to test their operation. In order to reliably test error detection or correction circuitry, at least one data word must be intentionally corrupted while the system is running. Therefore, a simple and systematic way to insert errors into digital data would allow easy triggering of the error detection or correction circuitry.
In view of the foregoing, it would be desirable to develop circuitry and methods to precisely insert errors into digital data. Furthermore, it would be desirable to make such circuitry easy to incorporate into existing systems.